import request from '@/utils/request'

// 获取完整权限树
export const getPermissionList = (data?: any) =>
  request({
    url: '/permission/list',
    method: 'post'
  })
// 查看权限详情
export const permissionView = (data?: any) =>
  request({
    url: '/permission/view',
    method: 'post',
    data
  })
// 创建权限
export const permissionCreate = (data?: any) =>
  request({
    url: '/permission/create',
    method: 'post',
    data
  })
// 修改权限
export const permissionUpdate = (data?: any) =>
  request({
    url: '/permission/update',
    method: 'post',
    data
  })
// 删除权限
export const permissionDelete = (data?: any) =>
  request({
    url: '/permission/delete',
    method: 'post',
    data
  })
// 分配子节点
export const permissionAssign = (data?: any) =>
  request({
    url: '/permission/assign',
    method: 'post',
    data
  })
// 回收子节点
export const permissionRevoke = (data?: any) =>
  request({
    url: '/permission/revoke',
    method: 'post',
    data
  })
